<?php
return [
    'components' => [
        'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=huawei',
            'username' => 'root',
            'password' => '',
            'tablePrefix' => 'hw_',
            'charset' => 'utf8',
        ],
        'mailer' => [
            'class' => 'yii\swiftmailer\Mailer',
            'viewPath' => '@common/mail',
            // send all mails to a file by default. You have to set
            // 'useFileTransport' to false and configure a transport
            // for the mailer to send real emails.
            'useFileTransport' => true,
        ],
        'redis' => [
            'class' => 'yii\redis\Connection',
            'hostname' => '192.168.3.108',
            'port' => 6379,
            'database' => 0,
        ],
        'wx' => [
            'class' => 'common\lib\Weixin',
            'appid' => 'wx59c3d8b4c5a4070b',
            'secret' => '5fec25470eea9b8d4388ffca46ad2f5c',
            'apis' => [
                'get_access_token' => 'https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={APPID}&secret={SECRET}',
                'send_template_msg' => 'https://api.weixin.qq.com/cgi-bin/message/template/send?access_token={ACCESS_TOKEN}',
                'get_template_list' => 'GET https://api.weixin.qq.com/cgi-bin/template/get_all_private_template?access_token={ACCESS_TOKEN}'
            ]
        ]
    ],
];
